package com.limao.dataEnum;

public enum OrderStateEnum {
	cancel("取消",0),
	to_pay("待付款",1),
	prepare("已付款",2),
	distribute("已发货",5),
	arrive("已签收",6);
      
	private String stringValue;  
    private int intVlue;  
      
    private OrderStateEnum(String stringValue){  
        this.stringValue = stringValue;  
    }  
      
	private OrderStateEnum(int intVlue) {
		this.intVlue = intVlue;
	}

	private OrderStateEnum(String stringValue, int intVlue) {
		this.stringValue = stringValue;
		this.intVlue = intVlue;
	}

	public String getStringValue() {
		return stringValue;
	}

	public int getIntVlue() {
		return intVlue;
	}

	public static String getEnumString(int i) {
		for (OrderStateEnum c : OrderStateEnum.values()) {
			if (c.getIntVlue() == i) {
				return c.stringValue;
			}
		}
		return "";
	}
	
	public static OrderStateEnum getEnum(int i) {
		for (OrderStateEnum c : OrderStateEnum.values()) {
			if (c.getIntVlue() == i) {
				return c;
			}
		}
		return null;
	}
	
	
	
}
